export default {
  title: "Aplee",
  description: "Just playing around.",
  // 打包目录
  dest: "dist",
  base: "/viteblog/",
  // 头部head
  head: [
    // 添加图标
    ["link", { rel: "icon", href: "/favicon.ico" }],
  ],
  // 使用插件
  plugins: [
    "@vuepress/active-header-links",
    "@vuepress/back-to-top",
    "@vuepress/medium-zoom",
    "@vuepress/nprogress",
    [
      "@vuepress/plugin-search",
      {
        locales: {
          "/": {
            placeholder: "Search",
          },
          "/zh/": {
            placeholder: "搜索",
          },
        },
      },
    ],
  ],
  // 主题配置
  themeConfig: {
    // 获取每个文件最后一次 git 提交的 UNIX 时间戳(ms)，同时它将以合适的日期格式显示在每一页的底部
    // lastUpdated: 'Last Updated', // string | boolean
    // 启动页面丝滑滚动
    smoothScroll: true,
    // 导航栏配置
    nav: [
      { text: "掘金", link: "https://juejin.cn/user/1794851640972423/posts" },
      { text: "Github", link: "https://github.com/He-fangyuan" },
      { text: "码云", link: "https://gitee.com/he-fangyuan" },
    ],
    sidebar: {
      "/": getSidebar(),
    },
  },
};

function getSidebar() {
  return [
    {
      text: "HTML",
      children: [
        { text: "基础", link: "/blogs/HTML/" },
        { text: "进阶", link: "/blogs/HTML/advanced" },
      ],
      sidebarDepth: 3,
    },
    {
      text: "CSS",
      children: [
        { text: "基础", link: "/blogs/CSS/" },
        { text: "进阶", link: "/blogs/CSS/advanced" },
      ],
    },
    {
      text: "JavaScript",
      children: [
        { text: "基础", link: "/blogs/Javascript/" },
        { text: "进阶", link: "/blogs/Javascript/advanced" },
        { text: "ES6", link: "/blogs/Javascript/ES6" },
      ],
    },
    {
      text: "TypeScript",
      children: [
        { text: "基础", link: "/blogs/TypeScript/" },
        { text: "进阶", link: "/blogs/TypeScript/advanced" },
      ],
    },
    {
      text: "Vue2",
      children: [
        { text: "基础", link: "/blogs/Vue2/" },
        { text: "进阶", link: "/blogs/Vue2/advanced" },
      ],
    },
    {
      text: "Vue3",
      children: [
        { text: "基础", link: "/blogs/Vue3/" },
        { text: "Vue3.2", link: "/blogs/Vue3/Vue3改进" },
        { text: "Pinia", link: "/blogs/Vue3/Pinia" },
        { text: "Vue通信", link: "/blogs/Vue3/Vue通信" },
      ],
    },
    {
      text: "面经",
      children: [
        { text: "前端面经", link: "/blogs/Experience/" },
        { text: "1 前端面试准备", link: "/blogs/Experience/1 前端面试准备" },
        {
          text: "2 程序员面试软技能",
          link: "/blogs/Experience/2 程序员面试软技能",
        },
        {
          text: "3 offer收割机之HTML篇",
          link: "/blogs/Experience/3 offer收割机之HTML篇",
        },
        {
          text: "4 offer收割机之CSS篇",
          link: "/blogs/Experience/4 offer收割机之CSS篇",
        },
        {
          text: "5 offer收割机之JavaScript篇",
          link: "/blogs/Experience/5 offer收割机之JavaScript篇",
        },
        {
          text: "6 offer收割机之性能优化篇",
          link: "/blogs/Experience/6 offer收割机之性能优化篇",
        },
        {
          text: "7 offer收割机之前端工程化篇",
          link: "/blogs/Experience/7 offer收割机之前端工程化篇",
        },
        {
          text: "8 offer收割机之计算机网络篇",
          link: "/blogs/Experience/8 offer收割机之计算机网络篇",
        },
        {
          text: "9 offer收割机之浏览器原理篇",
          link: "/blogs/Experience/9 offer收割机之浏览器原理篇",
        },
        {
          text: "10 offer收割机之手写代码篇",
          link: "/blogs/Experience/10 offer收割机之手写代码篇",
        },
        {
          text: "11 offer收割机之代码输出篇",
          link: "/blogs/Experience/11 offer收割机之代码输出篇",
        },
        {
          text: "12 LeetCode面试常考题目",
          link: "/blogs/Experience/12 LeetCode面试常考题目",
        },
        {
          text: "13 offer收割机之Vue篇",
          link: "/blogs/Experience/13 offer收割机之Vue篇",
        },
        {
          text: "14 vue项目的性能优化",
          link: "/blogs/Experience/14 vue项目的性能优化",
        },
        {
          text: "15 offer收割机之数据结构与算法",
          link: "/blogs/Experience/15 offer收割机之数据结构与算法",
        },
      ],
    },
  ];
}
